עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

שילוב בין פלאש ל HTML

Featured Replies

פורסם

שלום,

בנייתי אפליקצית פלאש שאמורה לשמש כתפריט באתר שלי.

אני יודע לזהות בפלאש Events באמצעות Action Script.

הוספתי את האפליקציה לדף HTML בעזרת DreamWeaver

כיצד אני גורם ל DreamWeaver לזהות שנלחץ כפתור בתפריט בפלאש ובהתאם להחליף עמודים?

תודה

קוד HTML:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/url]
<html xmlns="[url]http://www.w3.org/1999/xhtml">[/url]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image: url(images/pattern.jpg);
}
#mainFrame {
background-color: #FFFFFF;
height: 600px;
width: 925px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
margin-left: auto;
margin-right: auto;
}
#contentDiv {
position:absolute;
left:17px;
top:321px;
width:922px;
height:297px;
z-index:1;
}

-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<div id="contentDiv"></div>
<div id="mainFrame">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','[url]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','650','height','300','title','menu','src','menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','menu'[/url] ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[url]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"[/url] width="650" height="300" title="menu">
<param name="movie" value="menu.swf" />
<param name="quality" value="high" />
<embed src="menu.swf" quality="high" pluginspage="[url]http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"[/url] type="application/x-shockwave-flash" width="650" height="300"></embed>
</object>
</noscript>
</div>
</body>
</html>

קוד Action Script:


import fl.transitions.Tween;
import fl.transitions.easing.*;

var b1tween:Tween = new Tween(b1_btn, "x", Bounce.easeOut, 750, 65.9, 2, true);
b1_btn.buttonMode=true;

b1_btn.addEventListener(MouseEvent.MOUSE_OVER,rolloverb1);
b1_btn.addEventListener(MouseEvent.MOUSE_OUT,rolloutb1);
b1_btn.addEventListener(MouseEvent.MOUSE_DOWN, click1);

function rolloverb1(evt:MouseEvent) {
b1_btn.gotoAndPlay(2);
var label1in:Tween = new Tween(label1, "x", Bounce.easeOut, 900, 65.7, 1, true);
}

function rolloutb1(evt:MouseEvent) {
b1_btn.gotoAndPlay(1);
var label1out:Tween = new Tween(label1, "x", Bounce.easeOut, 65.7, 900, 1, true);
}

function click1(evt:MouseEvent){
trace("test");
}

ניתן לראות שכרגע כל פעם שאני לוחץ על כפתור פלאש מדפיס test ב output window איך אני מקשר את זה ל Dreamweaver

שוב תודה

פורסם
  • מחבר

תודה רבה

כתבתי את הקוד הבא ב AS3.0


function click1(evt:MouseEvent){
var url:String = "test.html";
var request:URLRequest = new URLRequest(url);

navigateToURL(request, '_parent');
}

הדבר היחידי שלא ברור לי כרגע הוא כיצד להפנות את פלאש לפתוח את האתר ב Frame ספציפי באתר שלי מה עלי לרשום בשדה במקום 'parent_'?

לframe שייצרתי בדף הhtml קוראים mainFrame

תודה

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.