Solved

Flash clickTAG undefined

Posted on 2007-04-09
4
2,719 Views
Last Modified: 2009-07-29
I am building a flash banner and the site that is going to run it has some instructions that says that I should use getURL(clickTAG1,"_blank") for the links. So I have created a layer at the bottom of my flash file and converted into a movieclip. I have then written:

on (release) {
      getURL(clickTAG1,"_blank");
}
in the action script for the movie clip. I also have a clickTAG2 that gets active after half of the movie. The html looks like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" quality="high" bgcolor="#ffffff" width="140" height="175" name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

When I click on the banner I get the text /undefined at the end which tells me that the clickTAG variables does not get populated. If I write an URL instead of the clickTAG variable in the flash code it works fine but it seems as if I can not pass the variables from the html to the flash. Can anyone see what I am doing wrong?
0
Comment
Question by:Steverino541
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18875702
actually you are placing button inside movieClip, but variables clickTAG1 and clickTAG2 are on _root.

to fix this issue..

use following :
---------
on (release) {
      getURL(_root.clickTAG1,"_blank");
}
---------

and

---------
on (release) {
      getURL(_root.clickTAG2,"_blank");
}
---------

- Aneesh Chopra


0
 

Author Comment

by:Steverino541
ID: 18875892
I have written it this way now:
on (release) {
      getURL(_root.clickTAG1,"_blank");
}

Now though a new window does not open. When I click on the banner nothings happens.
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18877111
try this:

on (release) {
      getURL(_level0.clickTAG1,"_blank");
}
0
 
LVL 4

Accepted Solution

by:
Blixtsystems earned 500 total points
ID: 18882234
You should be using FlashVars in the embed code instead of adding it as an URL string:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se" />
<embed src="dibanner_live_sv.swf" quality="high" bgcolor="#ffffff" width="140" height="175"
FlashVars="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se"
name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now